﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace Snake_Classic
{
    public class Wall
    {
        private int x, y, width, height;
        private Rectangle wallRec;

        public Rectangle WallRec
        {
            get 
            { 
                return wallRec;
            }
            set
            {
                wallRec = value;
            }
        }

        public Wall()
        {
            //Form1 f1 = new Form1();
            x = 280;
            y = 140;
            width = 20;
            height = 229;
            wallRec = new Rectangle(x, y, width, height);
        }

        public void DrawWall(Graphics graphics)
        {
            //path to the bonus image
            string directory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            string Filepath = Path.Combine(directory, "wall.jpg");
            //create image from path
            Image WallRect = Image.FromFile(Filepath);
            
            graphics.DrawImage(WallRect, wallRec);
        }
    }
}
